#include <stdio.h>
#include <stdbool.h>
#include <string.h>
#include "book.h"
#include <stdlib.h>

bool ShowList(P_Node_t p)
{
    if (p == NULL)
        return false;
    P_Node_t q = p->next;
    while (q != NULL)
    {
        printf("===============================\n");
        printf("书名：%s\n", q->data.name);
        printf("作者：%s\n", q->data.Author);
        printf("JSBN：%s\n", q->data.JSBN);
        printf("出版社：%s\n", q->data.Publisher);
        printf("出版年份：%d\n", q->data.year);
        printf("库存数量：%d\n", q->data.num);
        printf("当前借出数量：%d\n", q->data.count);
        printf("===============================\n");
        q = q->next;
    }
    return true;
}